package org.liqingye.es.utils;

import java.util.HashMap;

public class JsonResult<T> {

    private boolean result;

    private String msg;

    private HashMap<String, String> errors = new HashMap<String, String>();

    private T t;

    public JsonResult(boolean result, String msg) {
        super();
        this.result = result;
        this.msg = msg;
    }

    public JsonResult(boolean result, String msg, T t) {
        super();
        this.result = result;
        this.msg = msg;
        this.t = t;
    }

    public boolean isResult() {
        return result;
    }

    public JsonResult(boolean result, String msg, HashMap<String, String> errors, T t) {
        super();
        this.result = result;
        this.msg = msg;
        this.errors = errors;
        this.t = t;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public HashMap<String, String> getErrors() {
        return errors;
    }

    public void setErrors(HashMap<String, String> errors) {
        this.errors = errors;
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

}
